Game code is becoming increasingly complex, for example, Unreal Engine 3 has between 2 to 3 million lines of code. At the same time, game development costs are sky rocketing. Seventh generation console game development costs are almost 10 million USD for a single platform. This is between double to triple development costs for games on prior generation consoles. Costs double or triple again for a cross platform title to almost 30 million USD. Ubisoft's CEO and Chairman Yves Guillemot is expecting development costs to rise to about 60 million USD. Some AAA titles already exceed this amount.
One of the major drivers for this increase in cost and complexity is the dramatic increase in complexity of the hardware upon which the game is deployed. Processors have gone from a single core to 3 cores of the Xbox 360's Xenon to 9 cores in the Playstation (trademark) 3's Cell Broadband Engine (CBE). The core count is projected to grow even more in future generations of game consoles. For 7th generation gaming systems, single-threaded code had to be replaced by multi-threaded code. With it may bring problems related to parallel computing like deadlock, timing, and synchronization errors. These programming traps make scaling past the small number of cores on today's game machines presents an even greater challenge.
Furthermore, each of parallel architecture is extremely different from the other, making cross platform deployment difficult. This cross platform deployment includes not only PS3 to Xbox360 type issues, but also re-releasing games written for a current generation consoles on a handheld console or other platform many years down the road. An example of this is Final Fantasy. It was released in 1987 on the Nintendo Entertainment System (NES), but it is now available for the Playstation Portable (PSP) and other platforms. The PSP's MIPS R4000 based CPU is significantly more advanced and different from the NES's Ricoh 2A03.
Parallel Language Efforts
The video game development community is not alone in its struggle with the dramatic increase in computation demand and complexity, so much effort has already gone into developing programming languages to help alleviate some of the pitfalls associated with parallel programming and thereby increase productivity of parallel systems. In the high performance computing community, DARPA has been sponsoring the High Productivity Computer Systems (HPCS) program since 2002. This program seeks to increase program productivity where productivity is defined as, “a combination of performance, programmability, portability and robustness”. Fortress from Sun, X10 from IBM, and Chapel from Cray are all languages that have been developed as part of the HPCS effort. All three languages use the global view programming model. However, each language is very different from the other languages. Fortress is an interpreted language whose syntax tries to mimic the syntax of mathematical expressions. X10 is a subset of Java with added parallelism supporting constructs. Chapel is a compiled language that borrows heavily from C, Fortran, Java and Ada.
The real time embedded signal processing community started work in 1996 on an industry standary library for vector, signal and image processing. This produced the Vector, Signal and Image Processing Library (VSIPL) API in 1999, VSIPL++ (Object-Oriented VSIPL) in 2005 and parallel VSIPL++ in 2006. This API is maintained by the High Performance Embedded Computing Software Initiative (HPEC-SI) which is a consortium of industry, academic and government groups. VSIPL++ is expounded on in Section 2.
The academic community has produced high level parallel programming languages like ZPL and domain specific programming languages like Sh. ZPL is a high level programming language that allows convenient manipulation of arrays. ZPL is based on an underlying abstract machine that represents many features common to among parallel machines. These two ideas abstract away the parallelism. This requires programmer to implement communication/synchronization code. This in turn makes ZPL programs concise and easy to debug. Sh was developed as a flexible shader language at the University of Waterloo, and StreaMIT was developed at MIT to help program streaming applications.
Finally, the graphics community has produced a number of shader languages that have been extended into more flexible general purpose programming languages. These include Nvidia's CUDA, Open Computing Language (OpenCL) from the Khronos Group, and CT/RapidMind which grew out of Sh. Both CUDA and OpenCL are lower level languages that abstract away some parts of the hardware in order to simplify parallel programming. CUDA works on Nvidia's graphics while OpenCL can be used on any both AMD and Nvidia graphics hardware and on the x86.
CT/RapidMind is a higher level language originated as a commercially available and supported version of the Sh programming language. It features a Single Program Multiple Data (SPMD) model of computation. Its key innovation is its “Program” type. These are analogous to shaders on the GPU. “Program”s can be run in two different modes. “Immediate Mode” immediately runs the program.
“Retained Mode” allows one to capture the state of a “Program” and run it at a later time. This feature allows the collection of multiple “programs” into a mega “program.” It has its own compiler and runtime. It features “tight binding” which means that changes to the input to a program will not affect the output and “loose binding” which means that changes in the input will appear at the output. It also has scatter-gather primitives.
The specification of US patent application no. 2010/0079452 discloses photon mapping on graphics hardware using kd-trees. The pamphlet of WO 2008/016515 discloses the map in respect of VSIP++. These documents and following documents are incorporated herein by reference in its entirety.